package com.polaris.live.widget.refresh

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.RelativeLayout
import com.polaris.live.common.constant.PagConst.PAGE_CHANGE_LOADING_PAG
import com.polaris.live.databinding.WidgetItemLoadingBinding

/**
 * loading加载
 *
 * @author Created by lucas on 2023/10/16 20:31
 * @since 1.0.0
 */
class LoadingView(context: Context, attrs: AttributeSet? = null) : RelativeLayout(context, attrs) {

    private val mBinding = WidgetItemLoadingBinding.inflate(LayoutInflater.from(context), this)

    init {
        mBinding.loadingPag.apply {
            path = PAGE_CHANGE_LOADING_PAG
            setRepeatCount(-1)
            play()
        }
    }
}